import 'package:coinbaby/common/textstyle/textstyle.dart';
import 'package:coinbaby/login&regist/view/sms_counter.dart';
import 'package:flutter/material.dart';

import 'view/sms_input.dart';

class SmsCodePage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {

    final size = MediaQuery.of(context).size;
    final marginH = size.height * 0.06;

    return Scaffold(
      body: SafeArea(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            IconButton(
              icon: Icon(Icons.keyboard_arrow_left),
              onPressed: () => Navigator.pop(context),
            ),
            SizedBox(height: marginH),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 20),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text("请输入验证码", style: AppFont.textStyle(26, Colors.black, fontWeight: FontWeight.bold),),
                  SizedBox(height: size.height * 0.02),
                  Text.rich(
                    TextSpan(
                      children: [
                        TextSpan(
                          text: '验证码已发送至',
                          style: AppFont.textStyle(14, Colors.grey)
                        ),
                        TextSpan(
                          text: ' 186 6666 6666',
                          style: AppFont.textStyle(14, Colors.black)
                        )
                      ]
                    )
                  ),
                  Padding(
                    padding: EdgeInsets.only(top: marginH, bottom: 10),
                    child: SmsInputView()
                  ),
                  SmsCounterView()
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}

